home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMLINUX / MAIL / 9701 / 000042_owner-linux-arm…r.rutgers.edu _Fri Jan 16 16:31:42 1998.msg < prev    next >
Internet Message Format  |  1998-01-25  |  7KB

  1. Return-Path: <owner-linux-arm-outgoing@vger.rutgers.edu>
  2. Received: from nic.funet.fi (nic.funet.fi [128.214.248.6])
  3.     by odie.barnet.ac.uk (8.8.6/8.8.6) with ESMTP id QAA12015
  4.     for <willy@odie.fluff.org>; Fri, 16 Jan 1998 16:31:40 GMT
  5. Received: from vger.rutgers.edu ([128.6.190.2]:49980 "EHLO vger.rutgers.edu" ident: "root") by nic.funet.fi with ESMTP id <13300-6684>; Fri, 16 Jan 1998 18:28:29 +0200
  6. Received: by vger.rutgers.edu id <970903-241>; Fri, 16 Jan 1998 11:22:43 -0500
  7. Received: from nexusel.demon.co.uk ([158.152.30.195]:8321 "HELO globe" ident: "NO-IDENT-SERVICE") by vger.rutgers.edu with SMTP id <970983-241>; Fri, 16 Jan 1998 11:21:45 -0500
  8. Received: from spring.nexus.co.uk [192.0.0.3] (root)
  9.     by globe with smtp (Exim 1.73 #1)
  10.     id 0xtESM-0001zR-00; Fri, 16 Jan 1998 16:17:18 +0000
  11. Received: from localhost (spring.nexus.co.uk) [127.0.0.1] (pb)
  12.     by spring.nexus.co.uk with esmtp (Exim 1.82 #1)
  13.     id 0xtESK-00025I-00; Fri, 16 Jan 1998 16:17:16 +0000
  14. X-Mailer: exmh version 2.0zeta 7/24/97
  15. To: hjl@gnu.org, linux-arm@vger.rutgers.edu
  16. Subject: Re: binutils 2.8.1.0.19 
  17. In-reply-to: Your message of "Fri, 16 Jan 1998 10:21:20 GMT."
  18. Mime-Version: 1.0
  19. Content-Type: text/plain; charset=us-ascii
  20. Date:     Fri, 16 Jan 1998 16:17:16 +0000
  21. From: Philip Blundell <pb@nexus.co.uk>
  22. Message-Id: <E0xtESK-00025I-00@spring.nexus.co.uk>
  23. X-Orcpt: rfc822;linux-arm@vger.rutgers.edu
  24. Sender: owner-linux-arm@vger.rutgers.edu
  25. Precedence: bulk
  26. Status: RO
  27.  
  28. Philip Blundell writes:
  29. >Pat Beirne sent me this small patch.  It is needed for BFD to generate
  30. >working ELF code on the ARM.
  31.  
  32. That patch was no good (and my apologies to Pat, who wasn't actually the 
  33. guilty author, contrary to what I wrote above).
  34.  
  35. I forgot that changing the reloc type has some other repercussions, and there 
  36. were a few generated files that had apparently got missed somehow.
  37.  
  38. Here's another one.  With this I can generate apparently-working ELF files 
  39. (as in ld doesn't dump core) though I haven't checked it out fully yet.  If 
  40. somebody would like to give it a go and let me know what happens, I'd 
  41. appreciate it.
  42.  
  43. I will try to make a new gcc patch against the 2.8.0 release this weekend, and 
  44. see what needs to be done to make glibc support arm-elf.
  45.  
  46. p.
  47.  
  48. Index: gnu/binutils/bfd/ChangeLog.linux
  49. diff -u gnu/binutils/bfd/ChangeLog.linux:1.4 gnu/binutils/bfd/ChangeLog.linux:1.5
  50. --- gnu/binutils/bfd/ChangeLog.linux:1.4    Fri Jan 16 10:19:05 1998
  51. +++ gnu/binutils/bfd/ChangeLog.linux    Fri Jan 16 15:55:55 1998
  52. @@ -1,5 +1,8 @@
  53.  Fri Jan 16 10:06:19 1998  Philip Blundell  <pb@nexus.co.uk>
  54.  
  55. +    * bfd-in2.h: regenerated.
  56. +    * libbfd.h: likewise.
  57. +
  58.      * elf32-arm.c: Use REL relocs not RELA.
  59.  
  60.  Thu Dec 25 23:42:21 1997  Philip Blundell  <Philip.Blundell@pobox.com>
  61. Index: gnu/binutils/bfd/bfd-in2.h
  62. diff -u gnu/binutils/bfd/bfd-in2.h:1.2 gnu/binutils/bfd/bfd-in2.h:1.3
  63. --- gnu/binutils/bfd/bfd-in2.h:1.2    Thu Dec 18 11:18:43 1997
  64. +++ gnu/binutils/bfd/bfd-in2.h    Fri Jan 16 15:55:56 1998
  65. @@ -1244,6 +1244,7 @@
  66.    bfd_arch_arc,        /* Argonaut RISC Core */
  67.  #define bfd_mach_arc_base 0
  68.    bfd_arch_m32r,       /* Mitsubishi M32R/D */
  69. +#define bfd_mach_m32r        0  /* backwards compatibility */
  70.    bfd_arch_mn10200,    /* Matsushita MN10200 */
  71.    bfd_arch_mn10300,    /* Matsushita MN10300 */
  72.    bfd_arch_last
  73. @@ -1828,6 +1829,10 @@
  74.    BFD_RELOC_ARM_THUMB_IMM,
  75.    BFD_RELOC_ARM_THUMB_SHIFT,
  76.    BFD_RELOC_ARM_THUMB_OFFSET,
  77. +  BFD_RELOC_ARM_GOTPC,
  78. +  BFD_RELOC_ARM_GOT12,
  79. +  BFD_RELOC_ARM_GOT32,
  80. +  BFD_RELOC_ARM_JMPSLOT,
  81.  
  82.  /* Hitachi SH relocs.  Not all of these appear in object files. */
  83.    BFD_RELOC_SH_PCDISP8BY2,
  84. Index: gnu/binutils/bfd/elf32-arm.c
  85. diff -u gnu/binutils/bfd/elf32-arm.c:1.1 gnu/binutils/bfd/elf32-arm.c:1.2
  86. --- gnu/binutils/bfd/elf32-arm.c:1.1    Fri Jan 16 10:00:05 1998
  87. +++ gnu/binutils/bfd/elf32-arm.c    Fri Jan 16 15:55:57 1998
  88. @@ -23,7 +23,7 @@
  89.  #include "libbfd.h"
  90.  #include "elf-bfd.h"
  91.  
  92. -#define USE_RELA        /* we want RELA relocations, not REL */
  93. +#define USE_REL            /* we want REL relocations, not RELA */
  94.  
  95.  /* ARM relocations */
  96.  enum arm_reloc_type
  97. @@ -170,11 +170,25 @@
  98.       arelent *cache_ptr;
  99.       Elf32_Internal_Rela *dst;
  100.  {
  101. -  if (!arm_elf_howto_table[ R_ARM_ADDR32 ])    /* Initialize howto table if needed */
  102. +  abort();
  103. +}
  104. +
  105. +static void
  106. +arm_elf_info_to_howto_rel (abfd, cache_ptr, dst)
  107. +     bfd *abfd;
  108. +     arelent *cache_ptr;
  109. +     Elf32_Internal_Rel *dst;
  110. +{
  111. +  enum arm_reloc_type type;
  112. +
  113. +  /* Initialize howto table if needed */
  114. +  if (!arm_elf_howto_table[R_ARM_ADDR32])
  115.      arm_elf_howto_init ();
  116.  
  117. -  BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_ARM_max);
  118. -  cache_ptr->howto = arm_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
  119. +  type = (enum reloc_type) ELF32_R_TYPE (dst->r_info);
  120. +  BFD_ASSERT (type < R_ARM_max);
  121. +
  122. +  cache_ptr->howto = arm_elf_howto_table[(int) type];
  123.  }
  124.  
  125.  static reloc_howto_type *
  126. @@ -190,14 +204,14 @@
  127.  
  128.    switch ((int)code)
  129.      {
  130. -    default:
  131. -      return (reloc_howto_type *)NULL;
  132. -
  133.      case BFD_RELOC_NONE:        arm_reloc = R_ARM_NONE;            break;
  134.      case BFD_RELOC_32:            arm_reloc = R_ARM_ADDR32;        break;
  135.      case BFD_RELOC_16:            arm_reloc = R_ARM_ADDR16;        break;
  136.      case BFD_RELOC_8:            arm_reloc = R_ARM_ADDR8;        break;
  137.      case BFD_RELOC_ARM_PCREL_BRANCH:    arm_reloc = R_ARM_PCREL_BRANCH;        break;
  138. +
  139. +    default:
  140. +      return (reloc_howto_type *)NULL;
  141.      }
  142.  
  143.    return arm_elf_howto_table[ (int)arm_reloc ];
  144. @@ -290,6 +304,7 @@
  145.  #define ELF_ARCH                bfd_arch_arm
  146.  
  147.  #define elf_info_to_howto        arm_elf_info_to_howto
  148. +#define elf_info_to_howto_rel        arm_elf_info_to_howto_rel
  149.  #define bfd_elf32_bfd_reloc_type_lookup    arm_elf_reloc_type_lookup
  150.  
  151.  #include "elf32-target.h"
  152. Index: gnu/binutils/bfd/libbfd.h
  153. diff -u gnu/binutils/bfd/libbfd.h:1.2 gnu/binutils/bfd/libbfd.h:1.3
  154. --- gnu/binutils/bfd/libbfd.h:1.2    Thu Dec 18 11:18:59 1997
  155. +++ gnu/binutils/bfd/libbfd.h    Fri Jan 16 15:55:58 1998
  156. @@ -348,6 +348,11 @@
  157.    PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **,
  158.         const char **, unsigned int *, PTR *));
  159.  
  160. +/* Find the nearest line using DWARF 2 debugging information.  */
  161. +extern boolean _bfd_dwarf2_find_nearest_line
  162. +  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
  163. +       const char **, unsigned int *));
  164. +
  165.  /* A routine to create entries for a bfd_link_hash_table.  */
  166.  extern struct bfd_hash_entry *_bfd_link_hash_newfunc
  167.    PARAMS ((struct bfd_hash_entry *entry,
  168. @@ -728,6 +733,10 @@
  169.    "BFD_RELOC_ARM_THUMB_IMM",
  170.    "BFD_RELOC_ARM_THUMB_SHIFT",
  171.    "BFD_RELOC_ARM_THUMB_OFFSET",
  172. +  "BFD_RELOC_ARM_GOTPC",
  173. +  "BFD_RELOC_ARM_GOT12",
  174. +  "BFD_RELOC_ARM_GOT32",
  175. +  "BFD_RELOC_ARM_JMPSLOT",
  176.    "BFD_RELOC_SH_PCDISP8BY2",
  177.    "BFD_RELOC_SH_PCDISP12BY2",
  178.    "BFD_RELOC_SH_IMM4",
  179.  
  180.  
  181. unsubscribe: body of `unsubscribe linux-arm' to majordomo@vger.rutgers.edu